#ifndef xpack_lang_cxx_private_parse_xxx_result
#define xpack_lang_cxx_private_parse_xxx_result
#pragma push_macro("xuser")
#undef  xuser
#define xuser mixc::lang_cxx::inc
#include"define/base_type.hpp"
#include"dumb/struct_type.hpp"
#include"macro/xexport.hpp"
#include"macro/xstruct.hpp"
#include"meta/item_origin_of.hpp"
#pragma pop_macro("xuser")

namespace mixc::lang_cxx{
    template<class target_t>
    xstruct(
        xtmpl(parse_xxx_result, target_t),
        xpubb(inc::struct_type<target_t>),
        xprif(m_index_of_error, uxx)
    )
        using base_t = inc::struct_type<target_t>;

        xprops()
            xpubget_pubset(index_of_error, uxx);

            xpubgetx(is_parsed_completely, bool){
                xr{ return xthe.m_index_of_error == not_exist; }
            };

            xpubgetx(is_parsed_partially, bool){
                xr{ return ixx(xthe.m_index_of_error) > 0; }
            };

            xpubgetx(is_parsed_nothing, bool){
                xr{ return xthe.m_index_of_error == 0; }
            };
        $

        xprops_operator()

    public:
        parse_xxx_result(target_t & base, uxx index_of_error = not_exist) : 
            base_t(base),
            m_index_of_error(index_of_error) {}

        parse_xxx_result(target_t && base, uxx index_of_error = not_exist) : 
            base_t((target_t &&)base),
            m_index_of_error(index_of_error) {}

        parse_xxx_result() : base_t() {}
    $
}

#endif
